package com.example.afinal;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class AnalyzeActivity extends AppCompatActivity {
    //从上个页面MbListActivity跳转而来 接受数据 并准备下个页面的按钮跳转
    String TAG = "MbAnalyze";
    Button button;
    Button button2;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main3);
        button = (Button)findViewById(R.id.button);
        button2 = (Button)findViewById(R.id.button2);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(AnalyzeActivity.this, PictureActivity.class);
                startActivity(intent);
            }
        });
        button2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(AnalyzeActivity.this, SQLMsgActivity.class);
                startActivity(intent);
            }
        });


        String title = getIntent().getStringExtra("title");
        String detail = getIntent().getStringExtra("detail");

        Log.i(TAG, "onCreate: title = " + title);

        ((TextView) findViewById(R.id.title2)).setText(title);
        TextView show = (TextView) AnalyzeActivity.this.findViewById(R.id.show);
        show.setText(detail);

    }
}